#{extends 'CRUD/layout.html' /}

<div id="crudShow" class="${type.name}">
	
	<h2 id="crudShowTitle">&{'crud.show.title', type.modelName}</h2>
	<style>
		label{width:180px;}
		.crud_longtext textarea{width:362px;}
	</style>
	<div class="objectForm">
	#{form action:@save(object._key()), enctype:'multipart/form-data'}
		#{crud.form /}
		<p class="crudButtons">
			<input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
			<input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}" />
		</p>
	#{/form}
	</div>
	
	#{form @delete(object._key())}
		<p class="crudDelete">
			<input type="submit" value="&{'crud.delete', type.modelName}" />
		</p>
	#{/form}
	
	*{ NicEdit is small, but, too simple, sometimes naive.
	}*
	<script type="text/javascript" src="@{'public/libs/nicEdit.js'}"></script>
	<script type="text/javascript">
		bkLib.onDomLoaded(function() { nicEditors.allTextAreas({fullPanel : true,iconsPath:"@{'public/libs/nicEditorIcons.gif'}",width:"30%"}) });
	</script>
	
	*{
	<script type="text/javascript" src="@{'/public/libs/ckeditor/ckeditor.js'}"></script>
	<script type="text/javascript">
	<!--
	CKEDITOR.editorConfig = function(config){config.width = 362;}
	window.onload = function(){CKEDITOR.replaceAll({width:362});}
	//-->
	</script>
	}*
</div>